import main
from pom.base.webkey import WebKeys
from selenium.webdriver.common.by import By
from selenium import webdriver

# 页面
from pom.locator.logoLocator import *


class loginPage(WebKeys):
    def login(self, name, passworname):
        self.open("https://merchant.jsb.yhbyf.com/jsbAdmin/login?redirect=operatingStatements")
        self.one_input(*username, name)
        self.one_input(*password, passworname)
        self.one_click(*login)
        self.leep(5)
        self.one_click(*select)
        self.leep(5)

    # 获得登录的结果
    def get_result_true(self, txt):
        result = self.long_text(*login_text_wei, txt)
        return result

    # def get_result_text(self):
    #     result = self.get_text(*login_text)
    #     return result


if __name__ == '__main__':
    eling = loginPage(webdriver.Chrome())
    eling.login("18682300000", "zby123456")
